﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using UnityEngine;

namespace CornerMemo
{
    [CreateAssetMenu]
    public class UIManagerData : ScriptableObject
    {
        [SerializeField]
        private List<UIFormData> uiForms = new List<UIFormData>();

        public Dictionary<EnumUIForm, UIFormData> UIFormsDict;

        public void InitData()
        {
            UIFormsDict = new Dictionary<EnumUIForm, UIFormData>();
            foreach (var uiFormData in uiForms)
            {
                UIFormsDict[uiFormData.uiFormEnum] = uiFormData;
            }
        }
    }

    public enum EnumUIForm
    {
        None,
        [InspectorName("测试UI窗体")]UITestForm,
        [InspectorName("新的UI窗体")]MyNewUIForm,
        [InspectorName("列表窗口")]UIListForm,
    }
    [Serializable]
    public class UIFormData
    {
        public EnumUIForm uiFormEnum;
        public GameObject uiForm;
        public int order;
    }
   
}